<style>
    .form-group label{width:100px}
    .task .form-group{width: 45%;float: left;}
</style>
<section class="content task" >
    <div class="row">
        <div class="col-md-12">
            <div class="box box-danger">
                <div class="box-body">
                        <div class="form-group"  >
                            <label style="display:inline-table">装料站:</label>
                            {$data['task_from']}
                        </div>
                        <div class="form-group" style="width: 55%">
                            <label style="display:inline-table">抵达地址 :</label>
                            {$data.task_end}
                        </div>
                        <div class="form-group">
                            <label style="display:inline-table">联系人:</label>{$data.linkman}
                        </div>
                        <div class="form-group">
                            <label style="display:inline-table">联系电话:</label>{$data.mobile}
                        </div>

                        <div class="form-group">
                            <label style="display:inline-table">方量:</label>{$data['total_load']}方
                        </div>
                        <div class="form-group">
                            <label style="display:inline-table">运输车辆:</label>{$data.car_name}

                        </div>
                        <div style="clear: both;"></div>
                        <div class="box-footer">
                            <span class="input-group-btn">
                                <button class="btn btn-danger pull-left" type="button"  id="close-dialog">取消</button>
                                <button class="btn btn-primary pull-right" type="button" id='sendtask_submit'>确定发布</button>
                            </span>
                        </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $('#sendtask_submit').click(function () {
                publicEditinfoFormSubmit();
            });

        });

        function publicEditinfoFormSubmit() {
            $.messager.confirm('确定发送任务','确定发送任务吗?',function(){
                $.post("{:U('Task/sendToCar')}","id={$data['id']}", function (res) {
                    if (!res.status) {
                        $.messager.alert('提示信息', res.info, 'error');
                    } else {
                        $.messager.alert('提示信息', res.info, 'info');
                        dialog.get('dialogPage').close().remove();
                        taskTable.fnDraw(false);
                    }
                });
            });
            return false;
        }


    </script>
</section>